﻿using System.Collections;
using System.Collections.Generic;
using Google.Protobuf;
using JyFramework;
using UnityEngine;

public class TestNet : MonoBehaviour
{

    private JySocketClient _client;
    void Start()
    {
        BasePackageStaged t = new BasePackageStaged();
        t.SetPackId();

        _client = new JySocketClient("127.0.0.1", 8080);
        _client.ConnectServer();
        var l = new Login();
        l.Account = "ChenBoJunTestAct";
        l.Password = "ChenBoJunTestPsd";
        var pg = new NetPackage((int) NetID.Login, l.ToByteArray());
        _client.SendPackage(pg);

        //var basec = new BaseSocketClient("127.0.0.1", 8080);
        //basec.ConnectServer();
        //basec.SendMsg(new NetPackage((int)NetID.Login, new Login().ToByteArray()).AllData);
    }

    
    void Update()
    {
        
    }
}
